package com.sky.service.impl;

import com.sky.exception.BaseException;
import com.sky.mapper.ShopMapper;
import com.sky.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @Author mr.wu
 * @Data #{DATE} #{TIME}
 */
@Service
public class ShopServiceImpl implements ShopService {

    @Autowired
    private ShopMapper shopMapper;
    @Override
    public void updateStatus(Integer status) {
       int s =  shopMapper.update(status);
       if(s<1){
           throw new BaseException("修改店铺营业状态失败");
       }
    }

    @Override
    public Integer getStatus() {
        Integer status =  shopMapper.getStaus();
        return status;
    }
}
